package com.btl.service.ai.support.rag.scoring;

import com.btl.service.ai.support.rag.RagProperties;
import dev.langchain4j.model.scoring.ScoringModel;
import dev.langchain4j.model.scoring.onnx.OnnxScoringModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration(proxyBeanMethods = false)
public class ScoringModelProvider {

    @Bean
    public ScoringModel begRerankBaseScoringModel(RagProperties ragProperties) {
        return new OnnxScoringModel(
                ragProperties.getScoring().getBegRerankBase().modelPath(),
                ragProperties.getScoring().getBegRerankBase().tokenizerPath()
        );
    }
}